package com.lipei.vrp.imp;

import java.util.ArrayList;

import com.lipei.vrp.AlgorithmType;
import com.lipei.vrp.Context;
import com.lipei.vrp.IAlgorithm;
import com.lipei.vrp.IAlgorithmCreator;

public class VRP_rtr implements IAlgorithmCreator {

	private class Impl extends AbstractAlgorithm implements IAlgorithm {
		public Impl(String[] args) {
			super(args);
			algtype = AlgorithmType.RTR;
		}

		@Override
		public ArrayList<String> generateCommand(String vrppath) {
			ArrayList<String> commands = new ArrayList<String>();
			commands.add(Context.rtrpath);
			commands.add("-f");
			commands.add(vrppath);

			String command = Context.rtrpath + " -f \"" + vrppath + "\"";
			return commands;
		}
	}

	@Override
	public IAlgorithm argsCheck(String[] args) {
		return new Impl(args);
	}

	public static IAlgorithmCreator createIns() {
		// TODO Auto-generated method stub
		return new VRP_rtr();
	}

}
